local skel = fk.CreateSkill {
  name = "efengqi__tonglie_active",
}

skel:addEffect("active", {
  card_num = 0,
  target_num = 1,
  interaction = function(_, player)
    local all_choices = {"efengqi__tonglie1", "efengqi__tonglie2", "efengqi__tonglie3"}
    local choices = table.filter(all_choices, function (str)
      return not table.contains(player:getTableMark("efengqi__tonglie_removed"), str)
    end)
    return UI.ComboBox { choices = choices, all_choices = all_choices }
  end,
  card_filter = Util.FalseFunc,
  target_filter = function (self, player, target, selected)
    if #selected == 0 and target ~= player and type(self.interaction.data) == "string" then
      return not target:hasSkill("efengqi__tonglie", true) and
      not table.contains(target:getTableMark("efengqi__tonglie_removed"), self.interaction.data)
    end
  end,
})

return skel
